<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>

<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="stylesheet" type="text/css" href="../css/reset.css" />
<link rel="stylesheet" type="text/css" href="../css/common.css" />
<link rel="stylesheet" type="text/css" href="../css/index.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<jsp:include page="/main/header.jsp"></jsp:include>
<title>예약 하기</title>
<script type="text/javascript">
function NullCheck(){
	var form = document.rms;
	
	if(form.TEAM_NAME.value==''){
		alert("팀명을 입력하세요");
		form.TEAMNAME.focus();
	}
	else if(form.HP1.value==''){
		alert("지역번호을 입력하세요");
		form.HP1.focus();
	}
	else if(form.HP2.value==''){
		alert("중간 번호를 입력하세요");
		form.HP2.focus();
	}
	else if(form.HP3.value==''){
		alert("마지막 번호를 입력하세요");
		form.HP3.focus();
	}
	else if(form.TRANDATE.value==''){
		alert("날짜를 입력하세요");
		form.TRANDATE.focus();
	}
	else if(form.STARTTIME.value==''){
		alert("시작 시간을 입력하세요");
		form.STARTTIME.focus();
	}
	else if(form.ENDTIME.value==''){
		alert("끝 시간을 입력하세요");
		form.ENDTIME.focus();
	}
	else if(form.ROOMSIZE.value==''){
		alert("방 크기를 입력하세요");
		form.ROOMSIZE.focus();
	}
	else form.submit();
}
</script>
<body>
<%
 java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("yyyy-MM-dd"); // 오늘 날짜
 String today = formatter.format(new java.util.Date());
%>
<br><br><br><br><br><br><br><br><br>
<div class="content_inner">
   <div class="container">
      <div class="container_inner clearfix">
<div class="wrap">
	<h1 align="center" style="text-align: center;">예약하기</h1> 
	<div class="table" style="width: 500px;">	
		<form name="rms" method="POST" action="./RMSInsertDB.bo">
			<div class="textinput">팀 명  : <input TYPE="text" NAME="TEAM_NAME" ID="TEAM_NAME" style="width: 80px;"></div> 
			<div class="textinput">이 름  : &nbsp; <%= (String)session.getAttribute("login") %>
												<input TYPE="hidden" NAME="NAME" ID="NAME" value="<%= (String)session.getAttribute("login") %>"></div>
			<div class="textinput">&nbsp;H P :&nbsp;&nbsp; <select name="HP1" style="height: 30px;">
				    <option value="" selected="selected">번호선택</option>
				    <option value="010">010</option>
				    <option value="02" >02</option>
				    <option value="011">011</option>
				  </select>-
				  <input TYPE="text" NAME="HP2" ID="HP2" maxlength="4" size="4" style="width: 80px;">-
				  <input TYPE="text" NAME="HP3" ID="HP3" maxlength="4" size="4" style="width: 80px;"></div>
			<div class="textinput">날 짜  : <input TYPE="date" min=<%= today %> max="2020-08-31" step=1 value=<%= today %> NAME="TRANDATE" ID="TRANDATE" style="width: 180px;"></div>
			<div class="textinput">시 간  : <input TYPE="text" NAME="STARTTIME" ID="STARTTIME" maxlength="2" size="2" style="width: 80px;">
				  ~<input TYPE="text" NAME="ENDTIME" ID="ENDTIME" maxlength="2" size="2" style="width: 80px;">
			<font style="line-height: 30px;" SIZE="2">&nbsp;※&nbsp;24시간&nbsp;기준(OPEN&nbsp;10:00/CLOSE&nbsp;22:00)</font></div>
			<div class="textinput">크 기  :&nbsp; <select name="ROOMSIZE" style="height: 30px;">
				    <option value="" selected="selected">방 선택</option>
				    <option value="02~04">2 ~ 4명</option>
				    <option value="03~05" >3 ~ 5명</option>
				    <option value="05~06">5 ~ 6명</option>
				    <option value="07~08">7 ~ 8명</option>
				    <option value="09">9인이상</option>
				  </select></div>
			<p align="center" style="margin-top: 10px;">
			<input TYPE="button" value="예약" onclick="NullCheck();" style="width: 80px;">
			</p>
		</form>
</div></div></div></div></div>
</body>
</html>